<h1>All Pictures</h1>
<?php 
	$column = 1;
	$entries_per_row = 4;
	foreach ($pictures as $picture): ?>
		<div class="picturecover span-5 push-<?php echo $column; ?> prepend-top append-bottom <? if ($column % $entries_per_row == 0) echo 'last'; ?>">
			<div><?php echo $html->link($picture['Picture']['ID'] . '-' . $picture['Picture']['Name'] . '(' . $picture['Picture']['Owner'] . ')', 
						    '/pictures/view/'.$picture['Picture']['ID']); ?>
			</div>	
		</div>
	<? $column++; 
	   if ($column > $entries_per_row) $column = 1;
	endforeach; ?>
